package com.situ.day12;

public class AccountAdmin {
	private Double balance;
	private Integer number;
	
	public AccountAdmin(Integer number) {
		balance = 0.0;
		this.number = number;
	}
	//存钱
	public void deposite(double amount) {
		balance = balance + amount;
	}
	//取钱
	public void withdraw(double amount) throws MeiQianException {
		if (amount <= balance) {
			balance -= amount;
		}else {
			double need = amount - balance;
			throw new MeiQianException(need);
		}
	}
	public Double getBalance() {
		return balance;
	}
	public void setBalance(Double balance) {
		this.balance = balance;
	}
	public Integer getNumber() {
		return number;
	}
	public void setNumber(Integer number) {
		this.number = number;
	}
	

}
